package cn.wubo.base.entity;

import lombok.Data;
import org.springframework.security.core.GrantedAuthority;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

@Entity
@Table(name = "role")
@Data
public class RoleEntity extends Base implements GrantedAuthority {
    @Column(nullable = false, unique = true)
    private String name;
    @Column(nullable = false)
    private String description;

    @Override
    public String getAuthority() {
        return name;
    }
}
